Skip to content

[BA-2207] Adds script to generate jwks well known file & the private key#34

Closed
sakethkotamraju wants to merge 9 commits intoMobileWalletProtocol:domain-verificationfrom
sakethkotamraju:domainverification/saketh/keygen-script
Closed

[BA-2207] Adds script to generate jwks well known file & the private key#34
sakethkotamraju wants to merge 9 commits intoMobileWalletProtocol:domain-verificationfrom
sakethkotamraju:domainverification/saketh/keygen-script

Conversation

@sakethkotamraju
Copy link

Summary

https://linear.app/coinbase/issue/BA-2207/wsdk-create-script-to-generate-well-known-jwks-file-as-well-as-the

Generates the sec256k1 public key & outputs it in the base-jwks.json file. It also outputs the corresponding private key in the domain-verification-private-key.txt file. I also made a docs/domain-verification-key-generation readme file for instructions on how to do all of this.

How did you test your changes?

I ran the command and verified the generated output contents were accurate and outputted in the correct folder/file path.

Screen.Recording.2025-06-27.at.9.16.05.AM.mov

- domain verification key generation script for well known file
- yarn generate-key-script
- readme doc on how to use it
Copy link
Collaborator

@montycheese montycheese left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left some comments

Comment on lines 19 to 21
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isn't documented anywhere - but we likely don't need it anyways.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

base

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Base

Comment on lines 69 to 70
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to output it to a local directory called .well-known. also its currently but created as a hidden directory which might be annoying

- no .well-known output directory
- changed 'Coinbase' to 'base'
Copy link
Collaborator

@montycheese montycheese left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm. One small update. I'm going to pull locally to verify running locally before approving

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.log('🔑 Generating Coinbase domain verification keys...\n');
console.log('🔑 Generating Base domain verification keys...\n');

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be in base 64?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move this to scripts/verify-domain-keys-test.js

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think the output here is just base-jwk.json? cuz the file is generated in projectRoot/base-jek.json

- doesn't base64 encode the private key
- yarn validate-key-script for testing sec256kp1 encoding/decoding.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments